package ModuleBuilder.model;

import java.util.*;
import java.io.*;


/**
 * This is used to hold data for a tray
 * The data us that of a HashMap of Vectors
 * The HashMap is keyed by the name of the tray
 * the value is a vector which holds all the unit element
 */
public class BuilderTrayModel  implements Serializable {
  private ArrayList list;
  transient private ImageElement currEl; // current selected element in the tray

  public BuilderTrayModel() {
    list = new ArrayList();
  }

	/**
	 * @return
	 */
	public ArrayList getList() {
		return list;
	}
	
	public void addElement( ImageElement el ){
		list.add(el);
	}
	
	public ImageElement getImageAt( int index ){
		return ( (ImageElement)list.get(index));
	}

	/**
	 * @return Returns the currEl.
	 */
	public ImageElement getCurrEl() {
		return currEl;
	}

	/**
	 * @param currEl The currEl to set.
	 */
	public void setCurrEl(ImageElement currEl) {
		this.currEl = currEl;
	}

	/**
	 * @param list The list to set.
	 */
	public void setList(ArrayList list) {
		this.list = list;
	}
}